package com.ztf.bean;

import java.io.Serializable;

public class Message implements Serializable {
    private static final long serialVersionUID = -30426860556500485L;
    private User from;
    private User to;
    private long time;
    private String content;

    public Message(User from, User to, long time, String content) {
        this.from = from;
        this.to = to;
        this.time = time;
        this.content = content;
    }

    public User getFrom() {
        return from;
    }

    public void setFrom(User from) {
        this.from = from;
    }

    public User getTo() {
        return to;
    }

    public void setTo(User to) {
        this.to = to;
    }

    public long getTime() {
        return time;
    }

    public void setTime(long time) {
        this.time = time;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }
    @Override
    public String toString() {
        return "Message{" +
                "from=" + from +
                ", to=" + to +
                ", time=" + time +
                ", content='" + content + '\'' +
                '}';
    }
}
